*****************************************************************************************************************************
*****************************************************************************************************************************

****Replication file for CH Knutsen (2015) "Why Democracies Outgrow Autocracies in the Long Run..." Kyklos 68 (3): 357-84****

*****************************************************************************************************************************
*****************************************************************************************************************************

**Please contact author for additional information/lines on merging of variables from different datasets,******************** 
**assignment of country codes, and imputation model specifications generating imputed data sets******************************

*****************************************************************************************************************************
*****************************************************************************************************************************

* NOTE: The PRS Group, from which I have purchased the ICRG Researcher's Dataset, does not allow me to post their
* data in original form online. This implies that the investment profile and bureaucratic quality indices are not part of the
* replication dataset. As a consequence, aome models in the paper cannot be replicated using the publicly available dataset,
* unless one has access to the ICRG Researcher's Dataset (the version the author purchased is dated February 2009). 


use M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta, clear

keep gwno year country GDPpc_Maddison logGDPpc_Mad polity2 durable ethnic westeurplusoffshots easteursov africass asiapac mideanafr latam sunni shia catholic protestanglic ///  
orthodox hindu budhkonfutaoshinto indigeneous britishameric french portugese spanish belgian italian dutch oil_gas_valuePOP_2000 population_Maddison logpop_Mad ///
fh_cl fh_pr fh_press fh_repres fi_clindex fi_ftradeint fi_index fi_legprop fi_reg fi_sm fi_sog lntfp iabqipi iabqicl ARCOcreation ARCOinfrastructure ARCOskills ARCOTOTAL ///
ciri_assn ciri_disap ciri_dommov ciri_elecsd ciri_empinx_new ciri_empinx_old ciri_formov ciri_injud ciri_kill ciri_move_old ciri_physint ciri_polpris ciri_relfre_new ///
ciri_relfre_old ciri_speech ciri_tort fh_press fh_feb latitude logfrankrom pwt_csg pwt_er pwt_grgdpch pwt_gsg pwt_isg pwt_rgdpch ICRGprop posttenurefate fi_reg fi_index ///
chga_demo domestic2 domestic6 telegraph4 wdi_inet school hum_cap

sort gwno year
tsset gwno year
set more off, permanently

***********************************
**Creating/transforming variables**
***********************************

**generate growth in gdp pc variables
by gwno: generate lag1gdppc=GDPpc_Maddison[_n-1]
generate growthgdppc_Mad= 100*((GDPpc_Maddison-lag1gdppc)/lag1gdppc)
by gwno: generate lead5growthgdppc_Mad = growthgdppc_Mad[_n+5]

**generate log regime duration
generate logregdur = log(durable+1)

**Some countries do not have data on the alesina et al index, but have data on the structurally similar ELF index. I add data on these countries to reduce listwise deletion in the later analysis (measurement period is 1985; downloaded from http://weber.ucsd.edu/~proeder/data.htm)

generate ELF=.
*East Germany
replace ELF = 0.014 if gwno==265
*West Germany
replace ELF = 0.141 if gwno==1112
*Czechoslovakia
replace ELF = 0.507 if gwno==315
*Yemen
replace ELF = 0.05 if gwno==678
*Yemen South
replace ELF = 0.162 if gwno==680
*Yemen North
replace ELF = 0.017 if gwno==1113
*USSR
replace ELF = 0.701 if gwno==1111

***Generate inclusive variable that takes values from ELF when Alesina data are missing
generate ethnfrac =.
replace ethnfrac=  ethnic
replace ethnfrac=  ELF if ethnfrac==.


**Generate variable that measures growth in oil and natural gas income per capita (income measured in year 2000 dollars.)
by gwno: generate lagoilinc=  oil_gas_valuePOP_2000[_n-1]
generate growthoilinc = 100*((oil_gas_valuePOP_2000-lagoilinc)/lagoilinc)
generate logoilinc = ln(oil_gas_valuePOP_2000+1)



*generate year dummies
tab year, gen(_Iyear_)
**generate decade dummies


generate _1820s = _Iyear_21+ _Iyear_22+ _Iyear_23+ _Iyear_24+ _Iyear_25+ _Iyear_26+ _Iyear_27+ _Iyear_28+ _Iyear_29+ _Iyear_30
generate _1830s = _Iyear_31+ _Iyear_32+ _Iyear_33+ _Iyear_34+ _Iyear_35+ _Iyear_36+ _Iyear_37+ _Iyear_38+ _Iyear_39+ _Iyear_40
generate _1840s = _Iyear_41+ _Iyear_42+ _Iyear_43+ _Iyear_44+ _Iyear_45+ _Iyear_46+ _Iyear_47+ _Iyear_48+ _Iyear_49+ _Iyear_50
generate _1850s = _Iyear_51+ _Iyear_52+ _Iyear_53+ _Iyear_54+ _Iyear_55+ _Iyear_56+ _Iyear_57+ _Iyear_58+ _Iyear_59+ _Iyear_60
generate _1860s = _Iyear_61+ _Iyear_62+ _Iyear_63+ _Iyear_64+ _Iyear_65+ _Iyear_66+ _Iyear_67+ _Iyear_68+ _Iyear_69+ _Iyear_70
generate _1870s = _Iyear_71+ _Iyear_72+ _Iyear_73+ _Iyear_74+ _Iyear_75+ _Iyear_76+ _Iyear_77+ _Iyear_78+ _Iyear_79+ _Iyear_80
generate _1880s = _Iyear_81+ _Iyear_82+ _Iyear_83+ _Iyear_84+ _Iyear_85+ _Iyear_86+ _Iyear_87+ _Iyear_88+ _Iyear_89+ _Iyear_90
generate _1890s = _Iyear_91+ _Iyear_92+ _Iyear_93+ _Iyear_94+ _Iyear_95+ _Iyear_96+ _Iyear_97+ _Iyear_98+ _Iyear_99+ _Iyear_100
generate _1900s = _Iyear_101+ _Iyear_102+ _Iyear_103+ _Iyear_104+ _Iyear_105+ _Iyear_106+ _Iyear_107+ _Iyear_108+ _Iyear_109+ _Iyear_110
generate _1910s = _Iyear_111+ _Iyear_112+ _Iyear_113+ _Iyear_114+ _Iyear_115+ _Iyear_116+ _Iyear_117+ _Iyear_118+ _Iyear_119+ _Iyear_120
generate _1920s = _Iyear_121+ _Iyear_122+ _Iyear_123+ _Iyear_124+ _Iyear_125+ _Iyear_126+ _Iyear_127+ _Iyear_128+ _Iyear_129+ _Iyear_130
generate _1930s = _Iyear_131+ _Iyear_132+ _Iyear_133+ _Iyear_134+ _Iyear_135+ _Iyear_136+ _Iyear_137+ _Iyear_138+ _Iyear_139+ _Iyear_140
generate _1940s = _Iyear_141+ _Iyear_142+ _Iyear_143+ _Iyear_144+ _Iyear_145+ _Iyear_146+ _Iyear_147+ _Iyear_148+ _Iyear_149+ _Iyear_150
generate _1950s = _Iyear_151+ _Iyear_152+ _Iyear_153+ _Iyear_154+ _Iyear_155+ _Iyear_156+ _Iyear_157+ _Iyear_158+ _Iyear_159+ _Iyear_160
generate _1960s = _Iyear_161+ _Iyear_162+ _Iyear_163+ _Iyear_164+ _Iyear_165+ _Iyear_166+ _Iyear_167+ _Iyear_168+ _Iyear_169+ _Iyear_170
generate _1970s = _Iyear_171+ _Iyear_172+ _Iyear_173+ _Iyear_174+ _Iyear_175+ _Iyear_176+ _Iyear_177+ _Iyear_178+ _Iyear_179+ _Iyear_180
generate _1980s = _Iyear_181+ _Iyear_182+ _Iyear_183+ _Iyear_184+ _Iyear_185+ _Iyear_186+ _Iyear_187+ _Iyear_188+ _Iyear_189+ _Iyear_190
generate _1990s = _Iyear_191+ _Iyear_192+ _Iyear_193+ _Iyear_194+ _Iyear_195+ _Iyear_196+ _Iyear_197+ _Iyear_198+ _Iyear_199+ _Iyear_200
generate _2000s = _Iyear_201+ _Iyear_202+ _Iyear_203+ _Iyear_204+ _Iyear_205+ _Iyear_206+ _Iyear_207+ _Iyear_208+ _Iyear_209+ _Iyear_210



*generate iabqipi =  ICRGbuerqual*polity2
*generate iabqicl =  ICRGbuerqual*fh_cl

*************Interpolation*************************************************************************************

***linearly interpolate log GDP pc, assuming constant growth rates within period (using log-approximation)*****
sort gwno year
by gwno, sort : ipolate logGDPpc_Mad year, generate(logGDPpc_Mad_interpol)
**generate interpolated GDP pc level and growth variable
generate GDPpc_Mad_interpol = exp(logGDPpc_Mad_interpol)
by gwno: generate lag1gdppc_interpol=GDPpc_Mad_interpol[_n-1]
generate growthgdppc_Mad_interpol= 100*((GDPpc_Mad_interpol-lag1gdppc_interpol)/lag1gdppc_interpol)
by gwno: generate lead5growthgdppc_Mad_interpol = growthgdppc_Mad_interpol[_n+5]

***linearly interpolate log GDP pc, assuming constant growth rates within period (using log-approximation)*****
sort gwno year
by gwno, sort : ipolate logpop_Mad year, generate(logpop_Mad_interpol)


****Generate instrument from Knutsen (2011) based on Huntington*****
**country-years where the reigning regime originated in the (reverse wave) periods (, 1827], [1922, 1942], [1958, 1975], [1998, 2003] are scored a 1 on the dummy instrument,
generate regimeoriginreversewave=.
replace regimeoriginreversewave=1 if durable==0 & year<1828
replace regimeoriginreversewave=1 if durable==0 & year>1921 & year<1943 
replace regimeoriginreversewave=1 if durable==0 & year>1957 & year<1976 
replace regimeoriginreversewave=1 if durable==0 & year>1997 

generate regimeorigin_not_reversewave=.
replace regimeorigin_not_reversewave= 1 if durable==0 & year>1827 & year<1922
replace regimeorigin_not_reversewave= 1 if durable==0 & year>1942 & year<1958
replace regimeorigin_not_reversewave= 1 if durable==0 & year>1975 & year<1997

generate reversewave=.
replace reversewave=1 if regimeoriginreversewave==1
replace reversewave=0 if regimeorigin_not_reversewave==1
replace reversewave=0 if gwno==2 & durable==0

generate inreversewave = reversewave

sort gwno year
by gwno:carryforward inreversewave, replace
replace inreversewave=. if durable==.

browse gwno country year durable regimeoriginreversewave regimeorigin_not_reversewave reversewave inreversewave
correlate inreversewave polity2
correlate inreversewave polity2 if logGDPpc_Mad!=.

**generate lagged polity instrument from Helliwel 1994**
by gwno, sort: generate lag15polity = polity2[_n-15]

**generate Freedom House Index
generate FHI=(fh_pr+fh_cl)/2
correlate polity2 FHI

******Interpolation and other operations with the tfp data*************
sort gwno year
*linearly interpolate lntfp; assumin constant growth rates within period
by gwno, sort : ipolate lntfp year, generate(lnTFPipol)
sort gwno year
**generate tfp growth, using log approximation
by gwno, sort: generate lagTFP=lnTFPipol[_n-1]
generate tfpgrowth = 100*(lnTFPipol-lagTFP)
by gwno, sort: generate lead5tfpgrowth = tfpgrowth[_n+5]

*generate global technological frontier growth based on tfp growth of first UK and then US after 1908.
generate UKTFP=lagTFP
replace UKTFP=. if gwno!=200
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year
by year:carryforward UKTFP, replace
sort gwno year
sort year


generate USTFP=lagTFP
replace USTFP=. if gwno!=2
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year
sort year
by year:carryforward USTFP, replace
sort gwno year



generate GlFrTFP=.
replace GlFrTFP= UKTFP if year<1909
replace GlFrTFP= USTFP if year>1908

by gwno: generate leadGlFrTFP = GlFrTFP[_n+1]
generate GlFrTFPgrowth = 100*(leadGlFrTFP - GlFrTFP)

by gwno: generate lead5GFTgrowth = GlFrTFPgrowth[_n+5]

generate iapolgtfgrowth =polity2*GlFrTFPgrowth


***********Leader punishment*****************
***Use data fromadjusted version of ARCHIGOS data set, where I have taken out all leadership-spells in years where leader ruled less than six months. 
*Hence no duplication of country-year's, and a few country-years missing when more than three leaders held power in same year and none of the leaders ruled for more than six months.

**generate variables for whether ruler was punished one year after leadership spell ended
generate leaderpunishedexile = .
replace leaderpunishedexile = 0 if posttenurefate==0
replace leaderpunishedexile = 1 if posttenurefate==1
replace leaderpunishedexile = 1 if posttenurefate==2
replace leaderpunishedexile = 1 if posttenurefate==3

generate leaderpunished = .
replace leaderpunished = 0 if posttenurefate==0
replace leaderpunished = 0 if posttenurefate==1
replace leaderpunished = 1 if posttenurefate==2
replace leaderpunished = 1 if posttenurefate==3

*Generate average growth rates for tfp over shortest possible time period where Baier et al provide data (no interpolation)
sort gwno year
by gwno: generate ltfp1 = lntfp[_n-1]
by gwno: generate ltfp2 = lntfp[_n-2]
by gwno: generate ltfp3 = lntfp[_n-3]
by gwno: generate ltfp4 = lntfp[_n-4]
by gwno: generate ltfp5 = lntfp[_n-5]
by gwno: generate ltfp6 = lntfp[_n-6]
by gwno: generate ltfp7 = lntfp[_n-7]
by gwno: generate ltfp8 = lntfp[_n-8]
by gwno: generate ltfp9 = lntfp[_n-9]
by gwno: generate ltfp10 = lntfp[_n-10]
by gwno: generate ltfp11 = lntfp[_n-11]
by gwno: generate ltfp12 = lntfp[_n-12]
by gwno: generate ltfp13 = lntfp[_n-13]
by gwno: generate ltfp14 = lntfp[_n-14]
by gwno: generate ltfp15 = lntfp[_n-15]
by gwno: generate ltfp16 = lntfp[_n-16]
by gwno: generate ltfp17 = lntfp[_n-17]
by gwno: generate ltfp18 = lntfp[_n-18]
by gwno: generate ltfp19 = lntfp[_n-19]
by gwno: generate ltfp20 = lntfp[_n-20]

generate periodtfpgrowth=.
generate yeartfpper=.
replace	 periodtfpgrowth=100*(lntfp-ltfp1)
mvencode yeartfpper if periodtfpgrowth!=., mv(1)
replace	 periodtfpgrowth=100*(lntfp-ltfp2)/2 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(2)
replace	 periodtfpgrowth=100*(lntfp-ltfp3)/3 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(3)
replace	 periodtfpgrowth=100*(lntfp-ltfp4)/4 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(4)
replace	 periodtfpgrowth=100*(lntfp-ltfp5)/5 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(5)
replace	 periodtfpgrowth=100*(lntfp-ltfp6)/6 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(6)
replace	 periodtfpgrowth=100*(lntfp-ltfp7)/7 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(7)
replace	 periodtfpgrowth=100*(lntfp-ltfp8)/8 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(8)
replace	 periodtfpgrowth=100*(lntfp-ltfp9)/9 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(9)
replace	 periodtfpgrowth=100*(lntfp-ltfp10)/10 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(10)
replace	 periodtfpgrowth=100*(lntfp-ltfp11)/11 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(11)
replace	 periodtfpgrowth=100*(lntfp-ltfp12)/12 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(12)
replace	 periodtfpgrowth=100*(lntfp-ltfp13)/13 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(13)
replace	 periodtfpgrowth=100*(lntfp-ltfp14)/14 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(14)
replace	 periodtfpgrowth=100*(lntfp-ltfp15)/15 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(15)
replace	 periodtfpgrowth=100*(lntfp-ltfp16)/16 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(16)
replace	 periodtfpgrowth=100*(lntfp-ltfp17)/17 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(17)
replace	 periodtfpgrowth=100*(lntfp-ltfp18)/18 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(18)
replace	 periodtfpgrowth=100*(lntfp-ltfp19)/19 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(19)
replace	 periodtfpgrowth=100*(lntfp-ltfp20)/20 if periodtfpgrowth==.
mvencode yeartfpper if periodtfpgrowth!=., mv(20)


generate lagperiodtfp=.
replace lagperiodtfp = ltfp1 if yeartfpper==1
replace lagperiodtfp = ltfp2 if yeartfpper==2
replace lagperiodtfp = ltfp3 if yeartfpper==3
replace lagperiodtfp = ltfp4 if yeartfpper==4
replace lagperiodtfp = ltfp5 if yeartfpper==5
replace lagperiodtfp = ltfp6 if yeartfpper==6
replace lagperiodtfp = ltfp7 if yeartfpper==7
replace lagperiodtfp = ltfp8 if yeartfpper==8
replace lagperiodtfp = ltfp9 if yeartfpper==9
replace lagperiodtfp = ltfp10 if yeartfpper==10
replace lagperiodtfp = ltfp11 if yeartfpper==11
replace lagperiodtfp = ltfp12 if yeartfpper==12
replace lagperiodtfp = ltfp13 if yeartfpper==13
replace lagperiodtfp = ltfp14 if yeartfpper==14
replace lagperiodtfp = ltfp15 if yeartfpper==15
replace lagperiodtfp = ltfp16 if yeartfpper==16
replace lagperiodtfp = ltfp17 if yeartfpper==17
replace lagperiodtfp = ltfp18 if yeartfpper==18
replace lagperiodtfp = ltfp19 if yeartfpper==19
replace lagperiodtfp = ltfp20 if yeartfpper==20

by gwno: generate laglogpop1 = logpop_Mad_interpol[_n-1]
by gwno: generate laglogpop2 = logpop_Mad_interpol[_n-2]
by gwno: generate laglogpop3 = logpop_Mad_interpol[_n-3]
by gwno: generate laglogpop4 = logpop_Mad_interpol[_n-4]
by gwno: generate laglogpop5 = logpop_Mad_interpol[_n-5]
by gwno: generate laglogpop6 = logpop_Mad_interpol[_n-6]
by gwno: generate laglogpop7 = logpop_Mad_interpol[_n-7]
by gwno: generate laglogpop8 = logpop_Mad_interpol[_n-8]
by gwno: generate laglogpop9 = logpop_Mad_interpol[_n-9]
by gwno: generate laglogpop10 = logpop_Mad_interpol[_n-10]
by gwno: generate laglogpop11 = logpop_Mad_interpol[_n-11]
by gwno: generate laglogpop12 = logpop_Mad_interpol[_n-12]
by gwno: generate laglogpop13 = logpop_Mad_interpol[_n-13]
by gwno: generate laglogpop14 = logpop_Mad_interpol[_n-14]
by gwno: generate laglogpop15 = logpop_Mad_interpol[_n-15]
by gwno: generate laglogpop16 = logpop_Mad_interpol[_n-16]
by gwno: generate laglogpop17 = logpop_Mad_interpol[_n-17]
by gwno: generate laglogpop18 = logpop_Mad_interpol[_n-18]
by gwno: generate laglogpop19 = logpop_Mad_interpol[_n-19]
by gwno: generate laglogpop20 = logpop_Mad_interpol[_n-20]

generate lagperiodlogpop=.
replace lagperiodlogpop = laglogpop1 if yeartfpper==1
replace lagperiodlogpop = laglogpop2 if yeartfpper==2
replace lagperiodlogpop = laglogpop3 if yeartfpper==3
replace lagperiodlogpop = laglogpop4 if yeartfpper==4
replace lagperiodlogpop = laglogpop5 if yeartfpper==5
replace lagperiodlogpop = laglogpop6 if yeartfpper==6
replace lagperiodlogpop = laglogpop7 if yeartfpper==7
replace lagperiodlogpop = laglogpop8 if yeartfpper==8
replace lagperiodlogpop = laglogpop9 if yeartfpper==9
replace lagperiodlogpop = laglogpop10 if yeartfpper==10
replace lagperiodlogpop = laglogpop11 if yeartfpper==11
replace lagperiodlogpop = laglogpop12 if yeartfpper==12
replace lagperiodlogpop = laglogpop13 if yeartfpper==13
replace lagperiodlogpop = laglogpop14 if yeartfpper==14
replace lagperiodlogpop = laglogpop15 if yeartfpper==15
replace lagperiodlogpop = laglogpop16 if yeartfpper==16
replace lagperiodlogpop = laglogpop17 if yeartfpper==17
replace lagperiodlogpop = laglogpop18 if yeartfpper==18
replace lagperiodlogpop = laglogpop19 if yeartfpper==19
replace lagperiodlogpop = laglogpop20 if yeartfpper==20

by gwno: generate lagfrontier1 = GlFrTFPgrowth[_n-1]
by gwno: generate lagfrontier2 = GlFrTFPgrowth[_n-2]
by gwno: generate lagfrontier3 = GlFrTFPgrowth[_n-3]
by gwno: generate lagfrontier4 = GlFrTFPgrowth[_n-4]
by gwno: generate lagfrontier5 = GlFrTFPgrowth[_n-5]
by gwno: generate lagfrontier6 = GlFrTFPgrowth[_n-6]
by gwno: generate lagfrontier7 = GlFrTFPgrowth[_n-7]
by gwno: generate lagfrontier8 = GlFrTFPgrowth[_n-8]
by gwno: generate lagfrontier9 = GlFrTFPgrowth[_n-9]
by gwno: generate lagfrontier10 = GlFrTFPgrowth[_n-10]
by gwno: generate lagfrontier11 = GlFrTFPgrowth[_n-11]
by gwno: generate lagfrontier12 = GlFrTFPgrowth[_n-12]
by gwno: generate lagfrontier13 = GlFrTFPgrowth[_n-13]
by gwno: generate lagfrontier14 = GlFrTFPgrowth[_n-14]
by gwno: generate lagfrontier15 = GlFrTFPgrowth[_n-15]
by gwno: generate lagfrontier16 = GlFrTFPgrowth[_n-16]
by gwno: generate lagfrontier17 = GlFrTFPgrowth[_n-17]
by gwno: generate lagfrontier18 = GlFrTFPgrowth[_n-18]
by gwno: generate lagfrontier19 = GlFrTFPgrowth[_n-19]
by gwno: generate lagfrontier20 = GlFrTFPgrowth[_n-20]

generate lagperiodfrontier=.
replace lagperiodfrontier = lagfrontier1 if yeartfpper==1
replace lagperiodfrontier = lagfrontier2 if yeartfpper==2
replace lagperiodfrontier = lagfrontier3 if yeartfpper==3
replace lagperiodfrontier = lagfrontier4 if yeartfpper==4
replace lagperiodfrontier = lagfrontier5 if yeartfpper==5
replace lagperiodfrontier = lagfrontier6 if yeartfpper==6
replace lagperiodfrontier = lagfrontier7 if yeartfpper==7
replace lagperiodfrontier = lagfrontier8 if yeartfpper==8
replace lagperiodfrontier = lagfrontier9 if yeartfpper==9
replace lagperiodfrontier = lagfrontier10 if yeartfpper==10
replace lagperiodfrontier = lagfrontier11 if yeartfpper==11
replace lagperiodfrontier = lagfrontier12 if yeartfpper==12
replace lagperiodfrontier = lagfrontier13 if yeartfpper==13
replace lagperiodfrontier = lagfrontier14 if yeartfpper==14
replace lagperiodfrontier = lagfrontier15 if yeartfpper==15
replace lagperiodfrontier = lagfrontier16 if yeartfpper==16
replace lagperiodfrontier = lagfrontier17 if yeartfpper==17
replace lagperiodfrontier = lagfrontier18 if yeartfpper==18
replace lagperiodfrontier = lagfrontier19 if yeartfpper==19
replace lagperiodfrontier = lagfrontier20 if yeartfpper==20


**generate the lagged periodic polity variable

by gwno: generate lpolity1 = polity2[_n-1]
by gwno: generate lpolity2 = polity2[_n-2]
by gwno: generate lpolity3 = polity2[_n-3]
by gwno: generate lpolity4 = polity2[_n-4]
by gwno: generate lpolity5 = polity2[_n-5]
by gwno: generate lpolity6 = polity2[_n-6]
by gwno: generate lpolity7 = polity2[_n-7]
by gwno: generate lpolity8 = polity2[_n-8]
by gwno: generate lpolity9 = polity2[_n-9]
by gwno: generate lpolity10 = polity2[_n-10]
by gwno: generate lpolity11 = polity2[_n-11]
by gwno: generate lpolity12 = polity2[_n-12]
by gwno: generate lpolity13 = polity2[_n-13]
by gwno: generate lpolity14 = polity2[_n-14]
by gwno: generate lpolity15 = polity2[_n-15]
by gwno: generate lpolity16 = polity2[_n-16]
by gwno: generate lpolity17 = polity2[_n-17]
by gwno: generate lpolity18 = polity2[_n-18]
by gwno: generate lpolity19 = polity2[_n-19]
by gwno: generate lpolity20 = polity2[_n-20]
by gwno: generate lpolity21 = polity2[_n-21]
by gwno: generate lpolity22 = polity2[_n-22]
by gwno: generate lpolity23 = polity2[_n-23]
by gwno: generate lpolity24 = polity2[_n-24]
by gwno: generate lpolity25 = polity2[_n-25]



generate sumpolity = .

replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10)/5 if yeartfpper ==3 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10)/5 if yeartfpper ==4 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10)/5 if yeartfpper ==5 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10 + lpolity11)/6 if yeartfpper ==6 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12)/7 if yeartfpper ==7 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13)/8 if yeartfpper ==8 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14)/9 if yeartfpper ==9 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15)/10 if yeartfpper ==10 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16)/11 if yeartfpper ==11 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17)/12 if yeartfpper ==12 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18)/13 if yeartfpper ==13 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19)/14 if yeartfpper ==14 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20)/15 if yeartfpper ==15 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20+ lpolity21)/16 if yeartfpper ==16 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20+ lpolity21+ lpolity22)/17 if yeartfpper ==17 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20+ lpolity21+ lpolity22+ lpolity23)/18 if yeartfpper ==18 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20+ lpolity21+ lpolity22+ lpolity23+ lpolity24)/19 if yeartfpper ==19 
replace sumpolity = (lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20+ lpolity21+ lpolity22+ lpolity23+ lpolity24+ lpolity25)/20 if yeartfpper ==20 


**generate the historical/cumulated polity and fh_cl variables for testing effect on ARCO scores
generate HistoryPolity10 =(lpolity1 + lpolity2 + lpolity3 + lpolity4 + lpolity5+ lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10)/10
generate HistoryPolity15 =(lpolity1 + lpolity2 + lpolity3 + lpolity4 + lpolity5+ lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15)/15
generate HistoryPolity20 =(lpolity1 + lpolity2 + lpolity3 + lpolity4 + lpolity5+ lpolity6 + lpolity7 + lpolity8 + lpolity9 + lpolity10+ lpolity11+ lpolity12+ lpolity13+ lpolity14+ lpolity15+ lpolity16+ lpolity17+ lpolity18+ lpolity19+ lpolity20)/20

by gwno: generate lcl1 = fh_cl[_n-1]
by gwno: generate lcl2 = fh_cl[_n-2]
by gwno: generate lcl3 = fh_cl[_n-3]
by gwno: generate lcl4 = fh_cl[_n-4]
by gwno: generate lcl5 = fh_cl[_n-5]
by gwno: generate lcl6 = fh_cl[_n-6]
by gwno: generate lcl7 = fh_cl[_n-7]
by gwno: generate lcl8 = fh_cl[_n-8]
by gwno: generate lcl9 = fh_cl[_n-9]
by gwno: generate lcl10 = fh_cl[_n-10]
by gwno: generate lcl11 = fh_cl[_n-11]
by gwno: generate lcl12 = fh_cl[_n-12]
by gwno: generate lcl13 = fh_cl[_n-13]
by gwno: generate lcl14 = fh_cl[_n-14]
by gwno: generate lcl15 = fh_cl[_n-15]
by gwno: generate lcl16 = fh_cl[_n-16]
by gwno: generate lcl17 = fh_cl[_n-17]
by gwno: generate lcl18 = fh_cl[_n-18]
by gwno: generate lcl19 = fh_cl[_n-19]
by gwno: generate lcl20 = fh_cl[_n-20]

generate Historycl10 = (lcl1+lcl2+lcl3+lcl4+lcl5+lcl6+lcl7+lcl8+lcl9+lcl10)/10
generate Historycl15 = (lcl1+lcl2+lcl3+lcl4+lcl5+lcl6+lcl7+lcl8+lcl9+lcl10+lcl11+lcl12+lcl13+lcl14+lcl15)/15
generate Historycl20 = (lcl1+lcl2+lcl3+lcl4+lcl5+lcl6+lcl7+lcl8+lcl9+lcl10+lcl11+lcl12+lcl13+lcl14+lcl15+lcl16+lcl17+lcl18+lcl19+lcl20)/20


**********************************
**********************************
**********************************
**********************************
**********************************
*****  EMPIRICAL ANALYSIS  *******
**********************************
**********************************
**********************************
**********************************
**********************************

** First, code for results mentioned in the text before Table 1 on p.368 is presented
** Second, code for generating the four tables in the article is presented
** Third, code for generating all tables in the Online Appendix is presented
** Finally, code for other results mentioned in the text (after p.368) is presented

***********************************************
***********************************************
***Results, figures mentioned before p. 368.***
***********************************************
***********************************************

**Descriptive statistics on civll liberties and democracy measures, p.363
generate normcl = (7-fh_cl)/6

mean normcl if chga_demo==0
mean normcl if chga_demo==1
correlate polity2 normcl

**Footnote 2 on relationship civil liberties and general strikes/riots: General Strikes (domestic2); Riots (domestic6)
generate dom2dum =.
replace dom2dum = 0 if domestic2==0
replace dom2dum = 1 if domestic2>0 & domestic2!=.
generate dom6dum =.
replace dom6dum = 0 if domestic6==0
replace dom6dum = 1 if domestic6>0 & domestic6!=.

correlate domestic2 normcl if  chga_demo==0
correlate domestic6 normcl if  chga_demo==0

xtpcse domestic2 normcl logGDPpc_Mad growthgdppc_Mad logpop_Mad_interpol _1* if  chga_demo==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse domestic6 normcl logGDPpc_Mad growthgdppc_Mad logpop_Mad_interpol _1* if  chga_demo==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
logit dom2dum normcl logGDPpc_Mad growthgdppc_Mad logpop_Mad_interpol _1* if  chga_demo==0, cluster(gwno)
estimates store cc
logit dom6dum normcl logGDPpc_Mad growthgdppc_Mad logpop_Mad_interpol _1* if  chga_demo==0, cluster(gwno)
estimates store dd
estout  aa bb cc dd, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Correlations democracy and technology measures, reported on p. 364
correlate telegraph4 polity2 if year==1920 & polity>-11
correlate wdi_inet polity2 if year==2008 & polity>-11
correlate ARCOTOTAL polity2 if year==2000 & polity>-11

*******************************
**Graphs combined in Figure 1**
*******************************
twoway (scatter  telegraph4 polity2 if year==1920 & polity>-11, mlabel(country) mlabsize(tiny)) (lfit telegraph4 polity2 if year==1920& polity>-11)
twoway (scatter  wdi_inet polity2 if year==2008 & polity>-11, mlabel(country) mlabsize(tiny)) (lfit wdi_inet polity2 if year==2008& polity>-11)
twoway (scatter  ARCOTOTAL polity2 if year==2000 & polity>-11, mlabel(country) mlabsize(tiny)) (lfit ARCOTOTAL polity2 if year==2000& polity>-11)

**Correlation polity and other democracy indices, pp.364-5
correlate polity2 chga_demo
correlate polity2 FHI

**Generate Appendix Figures B.1-B.4 (time series plots for Polity):
**Argentina=160, Germany =260, Norway =385, Saudi Arabia=670
xtline polity2 if (gwno==260 | gwno==1112) & year>1860, cmissing(n) xscale(range(1860 2010))xtitle(Year) ytitle(Polity Index) i(gwno) t(year) tlabel(1860(10)2010, labsize(small) angle(forty_five) ticks)  byopts(cols(1) )
xtline polity2 if gwno==670 & year>1920, cmissing(n) xscale(range(1920 2010)) yscale(range(-10 10)) xtitle(Year) ytitle(Polity Index) i(country) t(year) tlabel(1920(10)2010, labsize(small) angle(forty_five) ticks)
xtline polity2 if gwno==385 & year>1810, cmissing(n) xscale(range(1820 2010)) yscale(range(-10 10)) xtitle(Year) ytitle(Polity Index) i(country) t(year) tlabel(1810(10)2010, labsize(small) angle(forty_five) ticks)
xtline polity2 if gwno==160 & year>1820,  cmissing(n) xscale(range(1820 2010)) xtitle(Year) ytitle(Polity Index) i(country) t(year) tlabel(1820(10)2010, labsize(small) angle(forty_five) ticks)


**Correlation TFP growth and Polity noted on p. 366
correlate lead5tfpgrowth polity2

**********************************************************************
**********************************************************************
************************* TABLES IN PAPER ****************************
**********************************************************************
**********************************************************************

**********************
***Generate TABLE 1***
**********************
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj2
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj3
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj4
save "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", replace
***Running models with IMPUTATION-CORRECTED errors over the five datasets
use "M:\apostoc\data\iall.dta", clear 
mi estimate, cmdok: xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store itfppcseeg
mi estimate, cmdok: xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store itfp2slseg
save "M:\apostoc\data\iall.dta", replace
use "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", clear
estout  bj1 bj2 bj3 bj4, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
***NBNB: NOT ABLE TO USE ESTOUT ON IMPUTED RESULTS; WHICH ARE THUS DIRECTLY TYPED INTO TABLES MANUALLY


**********************
***Generate TABLE 2***
**********************
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(fh_cl) artests(2)
estimates store gmmsysu
estat sargan
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_speech) artests(2)
estimates store gmmsysus
estat sargan
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_empinx_old) artests(2)
estimates store gmmsysue
estat sargan 
estout gmmsysu gmmsysus gmmsysue, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**********************
***Generate TABLE 3***
**********************
***Punishment and tfp growth
xtpcse lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<6, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtreg lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<6, fe
estimates store cb
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<6, re first
estimates store dd
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<6, fe first
estimates store ff
estout  aa cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)


**********************
***Generate TABLE 4***
**********************
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bja
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store bjb
save "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", replace
***Running models with IMPUTATION-CORRECTED errors over the five datasets
use "M:\apostoc\data\iall.dta", clear 
mi estimate, cmdok: xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store ipcseeg
mi estimate, cmdok: xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store i2slseg
save "M:\apostoc\data\iall.dta", replace
use "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", clear
estout  bja bjb cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
***NBNB: NOT ABLE TO USE ESTOUT ON IMPUTED RESULTS; WHICH ARE THUS DIRECTLY TYPED INTO TABLES MANUALLY

*****************************************************************************
*****************************************************************************
********************* TABLES FOR ONLINE APPENDIX ****************************
*****************************************************************************
*****************************************************************************


********************************
****** APPX SECTION B.3 ********
********************************

*****************
*** TABLE B.3 ***
*****************
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
generate abslat = abs(latitude)
xtpcse lead5tfpgrowth polity2 abslat logfrankrom lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store cc
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _Iyear_*, correlation(psar1) rhotype(tscorr) hetonly
estimates store dd
xtpcse lead5tfpgrowth polity2 logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store ee
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store ff
xtpcse lead5tfpgrowth polity2 lnTFPipol  GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store gg
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _19* if year>1945, correlation(psar1) rhotype(tscorr) pairwise
estimates store hh
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _19* if year>1959, correlation(psar1) rhotype(tscorr) pairwise
estimates store ii
estout  aa bb cc dd ee ff gg hh ii, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*****************
*** TABLE B.4 ***
*****************
*NB: MODEL 4 deviates sligthly from that reported in online appendix (about 150 too few obs in appx table). Haven't been able to track what went wrong here, but in any case this is not consequential for the results and interpretation
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _Iyear_*, fe
estimates store bj1
xtreg lead5tfpgrowth polity2 logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj2
xtreg lead5tfpgrowth polity2 lnTFPipol logpop_Mad_interpol _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3
xtreg lead5tfpgrowth polity2 lnTFPipol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj4
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _19* if year>1945, fe
estimates store bj5
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _19* if year>1959, fe
estimates store bj6
estout  bj1 bj2 bj3 bj4 bj5 bj6, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

********************************
****** APPX SECTION B.4 ********
********************************
by gwno, sort: generate lead2tfpgrowth = tfpgrowth[_n+2]
by gwno, sort: generate lead3tfpgrowth = tfpgrowth[_n+3]
by gwno, sort: generate lead7tfpgrowth = tfpgrowth[_n+7]
by gwno, sort: generate lead10tfpgrowth = tfpgrowth[_n+10]
*****************
*** TABLE B.5 ***
*****************

xtpcse lead7tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead7tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead7tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead7tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead7tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*****************
*** TABLE B.6 ***
*****************

xtpcse lead7tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead7tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead7tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead7tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead7tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*****************
*** TABLE B.7 ***
*****************
*Western
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==1, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if westeurplusoffshots==1, re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if westeurplusoffshots==1, fe first
estimates store ff
*Non-western (eastern europe as reference category for region dummies)
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa1
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb1
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if westeurplusoffshots==0, fe
estimates store cb1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if westeurplusoffshots==0, re first
estimates store dd1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if westeurplusoffshots==0, fe first
estimates store ff1
estout  aa bb cb dd ff aa1 bb1 cb1 dd1 ff1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*****************
*** TABLE B.8 ***
*****************
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa2
summarize polity2 if _est_aa2==1, detail
**median = -1
*Democratic (PI larger than median)
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2>-1, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2>-1, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2>-1, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2>-1, re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2>-1, fe first
estimates store ff

*Non-democratic (smaller than or equal to median)
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa1
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb1
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<0, fe
estimates store cb1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<0, re first
estimates store dd1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<0, fe first
estimates store ff1
estout  aa bb cb dd ff aa1 bb1 cb1 dd1 ff1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*****************
*** TABLE B.9 ***
*****************

summarize lnTFPipol if _est_aa2==1, detail
**median = 4.874393 
*Technologically advanced
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol>4.874393, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol>4.874393, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol>4.874393, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if lnTFPipol>4.874393, re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if lnTFPipol>4.874393, fe first
estimates store ff

*Technologically non-advanced
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol<4.874394, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa1
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol<4.874394, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb1
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if lnTFPipol<4.874394, fe
estimates store cb1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if lnTFPipol<4.874394, re first
estimates store dd1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if lnTFPipol<4.874394, fe first
estimates store ff1
estout  aa bb cb dd ff aa1 bb1 cb1 dd1 ff1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.10 ***
******************

summarize GDPpc_Maddison if _est_aa2==1, detail
**median =  2620.388
*Rich (cannot account for contempor correlation in model bb, due to inability to calculate covariance matrix)
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison>2620.388, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison>2620.388, correlation(psar1) hetonly pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison>2620.388, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if GDPpc_Maddison>2620.388, re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if GDPpc_Maddison>2620.388, fe first
estimates store ff

*Poor 
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison<2620.389, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa1
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison<2620.389, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb1
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if GDPpc_Maddison<2620.389, fe
estimates store cb1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam  africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if GDPpc_Maddison<2620.389, re first
estimates store dd1
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if GDPpc_Maddison<2620.389, fe first
estimates store ff1
estout  aa bb cb dd ff aa1 bb1 cb1 dd1 ff1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.11 ***
******************
*pairwise version of OLS with PCSE does not calculate covar-var matrix, use hetonly (does not take into account contemporaneous correlation)
xtpcse periodtfpgrowth sumpolity  lagperiodtfp lagperiodfrontier lagperiodlogpop  ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) hetonly
estimates store aa
xtpcse periodtfpgrowth sumpolity lagperiodtfp lagperiodfrontier lagperiodlogpop ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) hetonly
estimates store bb
xtreg periodtfpgrowth sumpolity lagperiodtfp lagperiodfrontier lagperiodlogpop _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cc
xtivreg periodtfpgrowth lagperiodtfp lagperiodfrontier lagperiodlogpop ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (sumpolity = lpolity15 inreversewave), re first
estimates store dd
xtivreg periodtfpgrowth lagperiodtfp lagperiodfrontier lagperiodlogpop _1840s _1850s _1860s _1870s _1880s _1890s _19* (sumpolity = lpolity15 inreversewave), fe first
estimates store ee
estout  aa bb cc dd ee, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.12 ***
******************
tobit ARCOTOTAL polity2 logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store a
tobit ARCOTOTAL HistoryPolity15 logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store c
tobit ARCOTOTAL fh_cl logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store d
tobit ARCOTOTAL Historycl15 logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store f
estout  a c d f, cells("b(star fmt(3)) t(fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.13 ***
******************
xtabond lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(fh_cl) artests(2)
estimates store gmmabu
estat sargan
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(fh_cl) artests(2)
estimates store gmmsysu
estat sargan
xtabond lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_speech) artests(2)
estimates store gmmabus
estat sargan
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_speech) artests(2)
estimates store gmmsysus
estat sargan
xtabond lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_empinx_old) artests(2)
estimates store gmmabue
estat sargan
xtdpdsys lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*,  lags(1) endog(ciri_empinx_old) artests(2)
estimates store gmmsysue
estat sargan 
estout  gmmabu gmmsysu gmmabus gmmsysus gmmabue gmmsysue, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.14 ***
******************

xtpcse lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<6, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<6, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<6, fe
estimates store cb
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<6, re first
estimates store dd
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<6, fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.15 ***
******************
xtpcse lead5tfpgrowth iabqicl fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.16 ***
******************
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 fi_index lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store bb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bb==1, correlation(psar1) hetonly pairwise
estimates store cb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store aaa
xtpcse lead5tfpgrowth polity2 fi_reg lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store bbb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bbb==1, correlation(psar1) hetonly pairwise
estimates store cbc
estout bb cb bbb cbc, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.17 ***
******************

summarize school hum_cap, detail
sort gwno year
by gwno, sort : ipolate hum_cap year, generate(hum_cap_ipol)
summarize hum_cap_ipol
sort gwno year
by gwno, sort : ipolate school year, generate(school_ipol)
summarize school_ipol
sort gwno year

xtpcse lead5tfpgrowth polity2 school_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1ps
xtpcse lead5tfpgrowth polity2 school_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2ps
xtreg lead5tfpgrowth polity2 school_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3ps
xtivreg lead5tfpgrowth lnTFPipol school_ipol logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj4ps
xtivreg lead5tfpgrowth lnTFPipol school_ipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5ps
xtpcse lead5tfpgrowth polity2 hum_cap_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1psa
xtpcse lead5tfpgrowth polity2 hum_cap_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2psa
xtreg lead5tfpgrowth polity2 hum_cap_ipol lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3psa
xtivreg lead5tfpgrowth lnTFPipol hum_cap_ipol logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj4psa
xtivreg lead5tfpgrowth lnTFPipol hum_cap_ipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5psa
estout  bj1ps bj2ps bj3ps bj4ps bj5ps bj1psa bj2psa bj3psa bj4psa bj5psa, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
 
******************
*** TABLE B.18 ***
******************
by gwno, sort: generate lead1growthgdppc_Mad = growthgdppc_Mad[_n+1]
by gwno, sort: generate lead1polity2 = polity2[_n+1]

xtpcse lead1growthgdppc_Mad growthgdppc_Mad polity2, correlation(psar1) rhotype(tscorr) pairwise
estimates store s
xtpcse lead1polity2 growthgdppc_Mad polity2, correlation(psar1) rhotype(tscorr) pairwise
estimates store t
estout  s t, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.19 ***
******************
**Dropping variables
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad logpop_Mad ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT2
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT3
**colonizer and plurality religion dummies
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT4
**Adding global technology frontier growth
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam GlFrTFPgrowth _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT5
**Using year dummies
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _Iyear_*, correlation(psar1) hetonly pairwise
estimates store BT6
**post-1945 sample
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if year>1945, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT7
***post-1959 sample
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if year>1959, correlation(psar1) rhotype(tscorr) pairwise
estimates store BT8
**FE model
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, fe
estimates store BT9
**RE model
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, re
estimates store BT10
**RE2SLS
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur ethnfrac  easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store BT11
estout BT3 BT2 BT4 BT5 BT6 BT7 BT8 BT9 BT10 BT11, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.20 ***
******************
*Western
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac _1* if westeurplusoffshots==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac _1* if westeurplusoffshots==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous _1* if westeurplusoffshots==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if westeurplusoffshots==1, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if westeurplusoffshots==1, fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if westeurplusoffshots==1, fe first
estimates store f
**Non-western
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac africass asiapac mideanafr latam _1* if westeurplusoffshots==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store a1
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac africass asiapac mideanafr latam _1* if westeurplusoffshots==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store b1
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous africass asiapac mideanafr latam _1* if westeurplusoffshots==0, correlation(psar1) rhotype(tscorr) pairwise
estimates store c1
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if westeurplusoffshots==0, fe
estimates store d1
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if westeurplusoffshots==0, fe first
estimates store e1
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if westeurplusoffshots==0, fe first
estimates store f1

estout  a b c d e f a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.21 ***
******************

xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa3
summarize polity2 if _est_aa3==1, detail
*median= -1
*democratic
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if polity>-1, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if polity>-1, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if polity>-1, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if polity>-1, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if polity>-1, fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if polity>-1, fe first
estimates store f
**Non-dem
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if polity<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store a1
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if polity<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store b1
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if polity<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store c1
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if polity<0, fe
estimates store d1
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if polity<0, fe first
estimates store e1
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if polity<0, fe first
estimates store f1
estout  a b c d e f a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.22 ***
******************
summarize lnTFPipol if _est_aa3==1, detail
**median =  4.876754 
*Technologically advanced

xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if lnTFPipol>4.876754, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if lnTFPipol>4.876754, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if lnTFPipol>4.876754, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if lnTFPipol>4.876754, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if lnTFPipol>4.876754, fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if lnTFPipol>4.876754, fe first
estimates store f
**Non-tech adv
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if lnTFPipol<4.876755, correlation(psar1) rhotype(tscorr) pairwise
estimates store a1
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if lnTFPipol<4.876755, correlation(psar1) rhotype(tscorr) pairwise
estimates store b1
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if lnTFPipol<4.876755, correlation(psar1) rhotype(tscorr) pairwise
estimates store c1
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if lnTFPipol<4.876755, fe
estimates store d1
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if lnTFPipol<4.876755, fe first
estimates store e1
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if lnTFPipol<4.876755, fe first
estimates store f1
estout  a b c d e f a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.23 ***
******************

summarize GDPpc_Maddison if _est_aa3==1, detail
**median =  2443.528  
*Rich 
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison>2443.528, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison>2443.528, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison>2443.528, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if GDPpc_Maddison>2443.528, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if GDPpc_Maddison>2443.528, fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if GDPpc_Maddison>2443.528, fe first
estimates store f
**Non-dem
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison<2443.529, correlation(psar1) rhotype(tscorr) pairwise
estimates store a1
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison<2443.529, correlation(psar1) rhotype(tscorr) pairwise
estimates store b1
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* if GDPpc_Maddison<2443.529, correlation(psar1) rhotype(tscorr) pairwise
estimates store c1
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* if GDPpc_Maddison<2443.529, fe
estimates store d1
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) if GDPpc_Maddison<2443.529, fe first
estimates store e1
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) if GDPpc_Maddison<2443.529, fe first
estimates store f1
estout  a b c d e f a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.24 ***
******************
by gwno, sort: generate lead2growthgdppc_Mad = growthgdppc_Mad[_n+2]
by gwno, sort: generate lead3growthgdppc_Mad = growthgdppc_Mad[_n+3]
by gwno, sort: generate lead7growthgdppc_Mad = growthgdppc_Mad[_n+7]
by gwno, sort: generate lead10growthgdppc_Mad = growthgdppc_Mad[_n+10]

by gwno, sort: generate lead2growthgdppc_Mad_interpol = growthgdppc_Mad_interpol[_n+2]
by gwno, sort: generate lead3growthgdppc_Mad_interpol = growthgdppc_Mad_interpol[_n+3]
by gwno, sort: generate lead7growthgdppc_Mad_interpol = growthgdppc_Mad_interpol[_n+7]
by gwno, sort: generate lead10growthgdppc_Mad_interpol = growthgdppc_Mad_interpol[_n+10]


xtpcse lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead3growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead3growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead3growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.25 ***
******************
xtpcse lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead7growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead7growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead7growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.26 ***
******************
xtpcse lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead10growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead10growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead10growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

******************
*** TABLE B.27 ***
******************
generate Polity_6 = 1 if polity2>5 & polity2!=.
replace Polity_6 =0 if polity2<6 & polity2!=.

generate Polity_4 = 1 if polity2>3 & polity2!=.
replace Polity_4 =0 if polity2<4 & polity2!=.
 
generate Polity_0 = 1 if polity2>-1 & polity2!=.
replace Polity_0 =0 if polity2<0 & polity2!=. 


**NB: Matching models take extremely long time to compute. Thus haven't re-checked these results in STATA14, and obviously there's been some changes to the nnmatch package as my original code for the "robust" option was "robusth".
nnmatch lead5growthgdppc_Mad Polity_6 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(1) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_6 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(3) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_6 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(5) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_6 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(10) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_0 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(1) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_0 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(3) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_0 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(5) robust(1) 
nnmatch lead5growthgdppc_Mad Polity_0 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam year, m(10) robust(1) 




*********************************************
*********************************************
*********************************************
*** Results mentioned in text after p.368 ***
*********************************************
*********************************************
*********************************************


*** p.368: Controlling for additional variable (ln regime duration) ***
xtpcse lead5tfpgrowth polity2 lnTFPipol logregdur  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1
xtpcse lead5tfpgrowth polity2 lnTFPipol logregdur   logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2
xtreg lead5tfpgrowth polity2 lnTFPipol logregdur   logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3
xtivreg lead5tfpgrowth lnTFPipol logregdur   logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj4
xtivreg lead5tfpgrowth lnTFPipol logregdur   logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5
estout  bj1 bj2 bj3 bj4 bj5, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.368: Robustness testing with year dummies ***

xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _Iyear_*, correlation(psar1) rhotype(tscorr) hetonly
estimates store bj1
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _Iyear_*, correlation(psar1) rhotype(tscorr) hetonly
estimates store bj2
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _Iyear_*, fe
estimates store bj3
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _Iyear_* (polity2 = lpolity15 inreversewave), re first
estimates store bj4
xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _Iyear_* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5
estout  bj1 bj2 bj3 bj4 bj5, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p. 368: Substituting Ln TFP with Ln GDP p.c. ***
xtpcse lead5tfpgrowth polity2 logGDPpc_Mad  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1
xtpcse lead5tfpgrowth polity2 logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2
xtreg lead5tfpgrowth polity2 logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3
xtivreg lead5tfpgrowth logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj4
xtivreg lead5tfpgrowth logGDPpc_Mad logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5
estout  bj1 bj2 bj3 bj4 bj5, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.368: Dropping variables seriatim
xtpcse lead5tfpgrowth polity2 logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store cc
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store dd
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store ee
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam, correlation(psar1) rhotype(tscorr) pairwise
estimates store ff
estout  aa bb cc dd ee ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtreg lead5tfpgrowth polity2  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store a
xtreg lead5tfpgrowth polity2 lnTFPipol  GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store b
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store c
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth , fe
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtivreg lead5tfpgrowth logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store a
xtivreg lead5tfpgrowth lnTFPipol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store b
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store c
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store d
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store e
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam (polity2 = lpolity15 inreversewave), re first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)


xtivreg lead5tfpgrowth logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store a
xtivreg lead5tfpgrowth lnTFPipol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store b
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store c
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth (polity2 = lpolity15 inreversewave), fe first
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** Footnote 6, p.369: Only using WAVE as instrument ***
xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = inreversewave), re first
estimates store bj4
xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = inreversewave), fe first
estimates store bj5
estout  bj4 bj5, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", replace

*** p.370 (TFP growth)/p.379 (GDP p.c. growth): Replicating results on the 5 imputed datasets individually ***
use "M:\apostoc\data\Madimpu1.dta", clear
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu1.dta", replace

use "M:\apostoc\data\Madimpu2.dta", clear
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu2.dta", replace

use "M:\apostoc\data\Madimpu3.dta", clear
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu3.dta", replace

use "M:\apostoc\data\Madimpu4.dta", clear
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu4.dta", replace

use "M:\apostoc\data\Madimpu5.dta", clear
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1820s _1830s _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu5.dta", replace

*** Imputation models ec growth ***

use "M:\apostoc\data\Madimpu1.dta", clear
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store e
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu1.dta", replace

use "M:\apostoc\data\Madimpu2.dta", clear
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store e
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu2.dta", replace

use "M:\apostoc\data\Madimpu3.dta", clear
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store e
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu3.dta", replace

use "M:\apostoc\data\Madimpu4.dta", clear
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store e
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu4.dta", replace


use "M:\apostoc\data\Madimpu5.dta", clear
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* (polity2 = inreversewave lpolity15), re first
estimates store e
xtivreg lead5growthgdppc_Mad logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
save "M:\apostoc\data\Madimpu5.dta", replace

*** p.371: Controlling for oil and gas income level and growth ***
use "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", clear

xtpcse lead5tfpgrowth polity2 growthoilinc logoilinc lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 growthoilinc logoilinc lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 growthoilinc logoilinc lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  growthoilinc logoilinc logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol growthoilinc logoilinc logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.371: Additional tests on ARCO for 10 year averages democracy/civ lib ***
tobit ARCOTOTAL HistoryPolity10 logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store b
tobit ARCOTOTAL Historycl10 logGDPpc_Mad logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam, ll(0) ul(1)
estimates store e
estout  b e, cells("b(star fmt(3)) t(fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p. 372: 5-year and 10-year lags when using civil liberties index from Freedom House ***

xtpcse lead5tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead10tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead10tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead10tfpgrowth fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead10tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead10tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.372 CIRI civil liberties measures, correlations and results ***
correlate polity2 fh_cl  ciri_speech
xtpcse lead5tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_speech = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_speech = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead3tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead3tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead3tfpgrowth ciri_speech lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead3tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_speech = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead3tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_speech = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

correlate polity2 fh_cl ciri_empinx_old
xtpcse lead5tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_empinx_old = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_empinx_old = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead3tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead3tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead3tfpgrowth ciri_empinx_old lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead3tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_empinx_old = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead3tfpgrowth lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (ciri_empinx_old = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)


*** p. 374: Testing post-office fate for different cut-offs on Polity *** 
xtpcse lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<4, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtreg lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<4, fe
estimates store cb
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<4, re first
estimates store dd
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<4, fe first
estimates store ff
estout  aa cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<0, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtreg lead5tfpgrowth polity2 leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if polity2<0, fe
estimates store cb
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<0, re first
estimates store dd
xtivreg lead5tfpgrowth leaderpunishedexile lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if polity2<0, fe first
estimates store ff
estout  aa cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.375: Additional models on interaction bueraucratic quality and civil liberties/democracy
xtpcse lead5tfpgrowth iabqipi polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead5tfpgrowth iabqicl fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead2tfpgrowth iabqipi polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead2tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead2tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead2tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead2tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead3tfpgrowth iabqipi polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead3tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead3tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead3tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead3tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead7tfpgrowth iabqipi polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead7tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead7tfpgrowth iabqipi  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead7tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead7tfpgrowth iabqipi  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead2tfpgrowth iabqicl fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead2tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead2tfpgrowth iabqicl  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead2tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead2tfpgrowth iabqicl  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**** Models below can only be run if include original ICRG data on BQI, which I have not been allowed to post by the PRS Group, see note at top of do file
*xtpcse lead5tfpgrowth iabqipi ICRGbuerqual polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store aa
*xtpcse lead5tfpgrowth iabqipi ICRGbuerqual  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bb
*xtreg lead5tfpgrowth iabqipi ICRGbuerqual  polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
*estimates store cb
*xtivreg lead5tfpgrowth iabqipi ICRGbuerqual  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
*estimates store dd
*xtivreg lead5tfpgrowth iabqipi ICRGbuerqual  lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
*estimates store ff
*estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*xtpcse lead5tfpgrowth iabqicl ICRGbuerqual fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store aa
*xtpcse lead5tfpgrowth iabqicl ICRGbuerqual  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bb
*xtreg lead5tfpgrowth iabqicl ICRGbuerqual fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
*estimates store cb
*xtivreg lead5tfpgrowth iabqicl ICRGbuerqual lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
*estimates store dd
*xtivreg lead5tfpgrowth iabqicl ICRGbuerqual lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
*estimates store ff
*estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*xtpcse lead10tfpgrowth iabqicl ICRGbuerqual fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) hetonly
*estimates store aa
*xtpcse lead10tfpgrowth iabqicl ICRGbuerqual  fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) hetonly
*estimates store bb
*xtreg lead10tfpgrowth iabqicl ICRGbuerqual fh_cl lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
*estimates store cb
*xtivreg lead10tfpgrowth iabqicl ICRGbuerqual lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), re first
*estimates store dd
*xtivreg lead10tfpgrowth iabqicl ICRGbuerqual lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (fh_cl = lpolity15 inreversewave), fe first
*estimates store ff
*estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.375. Models testing macro "implication" of Aghion et al., using interaction polity and tfp ***
generate iatfppolity= lnTFPipol*polity2

xtpcse lead5tfpgrowth polity2 iatfppolity lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store aa
xtpcse lead5tfpgrowth polity2 iatfppolity lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bb
xtreg lead5tfpgrowth polity2 iatfppolity lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store cb
xtivreg lead5tfpgrowth  iatfppolity lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store dd
xtivreg lead5tfpgrowth iatfppolity lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store ff
estout  aa bb cb dd ff, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p. 375: Additional information on Aghion et al. tests; showing how Polity changes when including extra controls ***
xtpcse lead5tfpgrowth polity2 fi_index lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store bb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bb==1, correlation(psar1) hetonly pairwise
estimates store cb
xtpcse lead5tfpgrowth polity2 fi_reg lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) hetonly pairwise
estimates store bbb
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bbb==1, correlation(psar1) hetonly pairwise
estimates store cbc
estout bb cb bbb cbc, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p. 376: Controlling for property rights ***

*** The first set of results can only be obtained if ICRG's original IPI index is included, and I have not been allowed to post this variable by The PRS group. See note at top of do file ***

**Run models on technological change controlling for property rights protection
*xtpcse lead5tfpgrowth polity2 ICRGInvest lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bj1p
*xtpcse lead5tfpgrowth polity2 ICRGInvest lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bj2p
*xtreg lead5tfpgrowth polity2 ICRGInvest lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
*estimates store bj3p
*xtivreg lead5tfpgrowth lnTFPipol ICRGInvest logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
*estimates store bj4p
*xtivreg lead5tfpgrowth lnTFPipol ICRGInvest logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
*estimates store bj5p
*estout  bj1p bj2p bj3p bj4p bj5p, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Run models on same sample but without property rights as control
*xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj1p==1, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bj1px
*xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj2p==1, correlation(psar1) rhotype(tscorr) pairwise
*estimates store bj2px
*xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj3p==1, fe
*estimates store bj3px
*xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if  _est_bj4p==1, re first
*estimates store bj4px
*xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if  _est_bj5p==1, fe first
*estimates store bj5px
*estout  bj1px bj2px bj3px bj4px bj5px, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Run models on technological change controlling for property rights protection (property rights index from Knutsen 2011)
xtpcse lead5tfpgrowth polity2 ICRGprop lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1p
xtpcse lead5tfpgrowth polity2 ICRGprop lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2p
xtreg lead5tfpgrowth polity2 ICRGprop lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19*, fe
estimates store bj3p
xtivreg lead5tfpgrowth lnTFPipol ICRGprop logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), re first
estimates store bj4p
xtivreg lead5tfpgrowth lnTFPipol ICRGprop logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave), fe first
estimates store bj5p
estout  bj1p bj2p bj3p bj4p bj5p, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Run models on same sample but without property rights as control
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj1p==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj1px
xtpcse lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj2p==1, correlation(psar1) rhotype(tscorr) pairwise
estimates store bj2px
xtreg lead5tfpgrowth polity2 lnTFPipol  logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* if  _est_bj3p==1, fe
estimates store bj3px
xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth ethnfrac  easteursov africass asiapac mideanafr latam _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if  _est_bj4p==1, re first
estimates store bj4px
xtivreg lead5tfpgrowth lnTFPipol logpop_Mad_interpol GlFrTFPgrowth _1840s _1850s _1860s _1870s _1880s _1890s _19* (polity2 = lpolity15 inreversewave) if  _est_bj5p==1, fe first
estimates store bj5px
estout  bj1px bj2px bj3px bj4px bj5px, cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)


*** p.376: Descriptive statistics GDP pc growth in democracies and autocracies ***

summarize growthgdppc_Mad_interpol if year<1914 & polity2<6 &polity2!=.
summarize growthgdppc_Mad_interpol if year<1914 & polity2>5 &polity2!=.
summarize growthgdppc_Mad_interpol if year<1946 & year>1913 & polity2<6 &polity2!=.
summarize growthgdppc_Mad_interpol if year<1946 & year>1913 & polity2>5 &polity2!=.
summarize growthgdppc_Mad_interpol if year>1945 & polity2<6 &polity2!=.
summarize growthgdppc_Mad_interpol if year>1945 & polity2>5 &polity2!=.

*** Footnote 12, p.377: Altering control set/sensitivity analysis of GDP pc growth results ***
**All baseline controls
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Dropping control seriatim
xtpcse lead5growthgdppc_Mad polity2 logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store d
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store e
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam, correlation(psar1) rhotype(tscorr) pairwise
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead5growthgdppc_Mad_interpol polity2  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store d
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store e
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam, correlation(psar1) rhotype(tscorr) pairwise
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtreg lead5growthgdppc_Mad polity2 logpop_Mad logregdur _1*, fe
estimates store a
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logregdur _1*, fe
estimates store b
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad  _1*, fe
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad  logregdur, fe
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)


xtivreg lead5growthgdppc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store a
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store b
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad _1* (polity2 = inreversewave lpolity15), fe first
estimates store c
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur (polity2 = inreversewave lpolity15), fe first
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtivreg lead5growthgdppc_Mad_interpol logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store a
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store b
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol _1* (polity2 = inreversewave lpolity15), fe first
estimates store c
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur (polity2 = inreversewave lpolity15), fe first
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

**Include technological frontier growth as control
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* GlFrTFPgrowth, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead5growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1* GlFrTFPgrowth, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1* GlFrTFPgrowth, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1* GlFrTFPgrowth, fe
estimates store d
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15) GlFrTFPgrowth, fe first
estimates store e
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15) GlFrTFPgrowth, fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.377: Hausman testing FE against RE model ***
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store p
xtreg lead5growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, re
estimates store q
hausman p q

*** p.378: Comparing FE with RE version of 2SLS ***
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store a
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store b
xtivreg lead5growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), re first
estimates store c
xtivreg lead5growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), re first
estimates store d
estout  a b c d, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** Footnote 14, p. 378: Testing alternative lagstructures
xtpcse lead2growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead2growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead2growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead2growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead2growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead2growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead3growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead3growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead3growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead3growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead7growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead7growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead7growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead7growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

xtpcse lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store a
xtpcse lead10growthgdppc_Mad_interpol polity2 logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store b
xtpcse lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac  britishameric french portugese spanish belgian sunni shia catholic protestanglic orthodox hindu budhkonfutaoshinto indigeneous easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store c
xtreg lead10growthgdppc_Mad polity2 logGDPpc_Mad  logpop_Mad logregdur _1*, fe
estimates store d
xtivreg lead10growthgdppc_Mad logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store e
xtivreg lead10growthgdppc_Mad_interpol logGDPpc_Mad_interpol  logpop_Mad_interpol logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store f
estout  a b c d e f, cells("b(star fmt(3)) t(par fmt(2))") starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)

*** p.379: Controlling for TFP growth

xtpcse lead5growthgdppc_Mad lead5tfpgrowth polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store bja
xtivreg lead5growthgdppc_Mad lead5tfpgrowth logGDPpc_Mad  logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store bjb
save "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", replace
***Running models with IMPUTATION-CORRECTED errors over the five datasets
use "M:\apostoc\data\iall.dta", clear 
mi estimate, cmdok: xtpcse lead5growthgdppc_Mad lead5tfpgrowth polity2 logGDPpc_Mad  logpop_Mad logregdur ethnfrac easteursov africass asiapac mideanafr latam _1*, correlation(psar1) rhotype(tscorr) pairwise
estimates store ipcseeg
mi estimate, cmdok: xtivreg lead5growthgdppc_Mad lead5tfpgrowth logGDPpc_Mad logpop_Mad logregdur _1* (polity2 = inreversewave lpolity15), fe first
estimates store i2slseg
save "M:\apostoc\data\iall.dta", replace
use "M:\apostoc\data\Replication_data_set_Knutsen_2015_Kyklos.dta", clear
estout  bja bjb cells(b(star fmt(%9.3f)) t(par fmt(%9.2f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N)style (tex)
***NBNB: NOT ABLE TO USE ESTOUT ON IMPUTED RESULTS; WHICH ARE THUS DIRECTLY TYPED INTO TABLES MANUALLY


*******************************************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************************************************
